<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="./购物车.css">
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>

<body>
  
  <div id="app">
    <header>购物车</header>
    <main>
      <ul>
        <li v-for="(v, i) in list">
          <input type="checkbox" v-model="v.isChecked">
          <dl>
            <dt><img v-bind:src="v.url" alt=""></dt>
            <dd>
              <h3>{{ v.title }}</h3>
              <p>
                <b>单价:{{ v.price }}</b>
                <div>
                  <button @click="v.count--">-</button>
                  <b>{{ v.count }}</b>
                  <button @click="v.count++">+</button>
                </div>
              </p>
            </dd>
          </dl>
        </li>
      </ul>
    </main>
    <footer>
      <div>
        全选
        <input type="checkbox" v-model="totalCheck">
        <span>总数量：{{ totalCount  }}</span>
        <span>总价：{{ totalPrice }}</span>
      </div>
      <div>
        <button>立即购买</button>
      </div>
    </footer>
  </div>
  <script src="购物车.js"></script>
</body>

</html>